﻿using dis.sys.hw1.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
using System.ServiceModel;
using System.Text;

namespace dis.sys.hw1.Contract
{
    // interface of service which allows to register a hotel
    // to the search service
    [ServiceContract]
    public interface IRegistrationService
    {
        [OperationContract]
        bool IsUp();

        [MethodImpl(MethodImplOptions.Synchronized)]
        [OperationContract]
        void Register(string allianceName, int port);

        [MethodImpl(MethodImplOptions.Synchronized)]
        [OperationContract]
        void Unregister(string allianceName);

        [MethodImpl(MethodImplOptions.Synchronized)]
        [OperationContract]
        void InvalidateCacheLine(string hotelName, double stars, double rating);

        IDictionary<Tuple<long, long, double, double>, Tuple<DateTime, IList<Hotel>>> QueryCache { get; set; }
    }
}
